<template>
  <view class="cradbox" @click="goxq(data.shoperid,data.id)" :style="{'--themcolor':usethemestore.themecolor,'--themcolor2':usethemestore.themecolor2}"> 
     <image :src="'http://127.0.0.1:3006'+data.img" mode="aspectFill"></image>
	 <view class="b">
		  <view class="meauname">{{data.title}}</view>
		  <view class="bb">
			    <view class="">发布时间</view>
			    <view class="">{{data.updatedAt}}</view>
			    <view class="l">￥{{data.price}}</view>
		  </view>
	 </view>
  </view>
</template>

<script setup>
	import themestore from '@/store/theme.js'
	const usethemestore = themestore()
	defineProps(['data'])
	const goxq=(userid,id)=>{
		 uni.navigateTo({
		 	url:`/pages/producet-xq/producet-xq?userid=${userid}&id=${id}`
		 })
	}
</script>

<style lang="scss" scoped>
	.cradbox{
		height: 100%;
		width: 100%;
		image{
			height: 75%;
			width: 100%;
			display: block;
		}
		.b{
			height: 25%;
			width: 100%;
			>view{
				height: 50%;
			}
			.meauname{
				width: 300rpx;
				 font-size: 25rpx;
				 font-weight: 700;
				 white-space: nowrap;
				 overflow: hidden;
				 text-overflow: ellipsis;
				 padding-left: 10rpx;
				 line-height: 2.5;
			}
				.bb{
					display: flex;
					font-size: 23rpx;align-items: center;
					padding: 0 10rpx;
					.l{
						justify-content: flex-start;
						color: var(--themcolor);
						font-weight: 700;
					}
					view{
						width: 33.3%;
						white-space: nowrap;
						overflow: hidden;
						text-overflow: ellipsis;
					}
				}
		}
	}
</style>